# Contributor: Roberto Oliveira <robertoguimaraes8@gmail.com>
# Maintainer: Roberto Oliveira <robertoguimaraes8@gmail.com>
pkgname=liboggz
pkgver=1.1.1
pkgrel=2
pkgdesc="Provides a simple programming interface for reading and writing Ogg files and streams"
url="https://www.xiph.org/oggz/"
arch="all"
license="BSD-3-Clause"
makedepends="libogg-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://downloads.xiph.org/releases/liboggz/liboggz-$pkgver.tar.gz"

prepare() {
	default_prepare

	update_config_sub
	update_config_guess
}

build() {
	./configure --prefix=/usr
	make
}

check() {
	#FIXME: test segfaults on some archs
	sed -i "/TESTS = httpdate_test\$(EXEEXT)/d" src/tools/oggz-chop/Makefile
	make check
}

package() {
	make install DESTDIR="$pkgdir"
}

sha512sums="8f5fc8ca49cb6f7a1160a9c1932876b771d55985d59ddc1f48497dfc08641414a58244d7a7e52bfcecdb69f52913d0123efd8f92513f8b9064e4abe1442f2cba  liboggz-1.1.1.tar.gz"
